@extends('layout.admin')

@section('title')
<title>分类列表</title>
@endsection

@section('content')
<style>
    .col-md-3{
        width:30%;
        float:left;
        padding-right:50px;
        padding-left:50px;
        margin: 0px auto;
    }
    .form{
         overflow: hidden;
        height: 30px;
     }
</style>

    <div id="main_container" class="color_3">
      <div class="row-fluid color_3">
        <div class="span12 color_3">
          <div class="box paint color_3">
            <div class="title color_3">
              <h4> <i class=" icon-bar-chart"></i><span>分类列表 </span> </h4>
            </div>
            <!-- End .title -->
            
            {{-- 主题内容 start --}}
            <div class="content top">
              <table id="datatable_example" class="responsive table table-striped table-bordered" style="width:100%;margin-bottom:0; ">
                <thead>
                  <tr>
                    <th class="no_sort"> ID </th>
                    <th class="no_sort to_hide_phone"> 分类名 </th>
                    <th class="no_sort to_hide_phone"> 状态 </th>
                    <th class="ms no_sort "> 操作 </th>
                  </tr>
                </thead>
                <tbody>
                @foreach($cates as $k=>$v)
                  <tr>
                    <td>{{$v['id']}}</td>
                    <td class="to_hide_phone">{{$v['name']}}</td>
                    <td class="to_hide_phone">{{$v['status'] ? '启用' : '禁用'}}</td>
                    <td class="ms">

                    	<div class="btn-group">
                    	 <a class="btn btn-small" rel="tooltip" data-placement="left" data-original-title=" edit " href="/cate/{{$v->id}}/edit">
                    	 <button class="btn btn-small">编辑</button>
                    	 </a> 
                    	 <form action="/cate/{{$v->id}}" method="post">
                            <input type="hidden" name="_method" value="delete">
                            {{csrf_field()}}
                            <button class="btn btn-small" data-placement="left" data-original-title="remove">删除</button>
                        </form>
                        </div>
                    </td>
                  </tr>
                  @endforeach
                </tbody>
              </table>
          <!-- End .content --> 
       	 </div>
         {{-- 主题内容 end --}}
        </div>
        <!-- End box --> 
      </div>
      <!-- End .span12 --> 
    </div>
    <!-- End .row-fluid -->
    

  <!-- End .row-fluid -->

  
</div>
<!-- End #container -->

@endsection
 
